package com.example.shop_front_api.mapper;

import com.example.shop_front_api.entity.MemberAddress;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface MemberAddressMapper {
    int insertAddress(MemberAddress address);
    int clearDefaultAddress(int memberId);
    List<MemberAddress> getAddressListByMemberId(int memberId);
    MemberAddress getAddressById(int id);
    int updateAddress(MemberAddress address);
    int deleteAddress(int id,int memberId);
    int setDefaultAddress(@Param("id") int id,@Param("memberId") int memberId);
    MemberAddress getDefaultAddressByMemberId(int memberId);
}
